import request from '@/utils/request'

export function info(id) {
  return request({
    url: 'admin/api/userExtract/info/' + id,
    method: 'get'
  })
}

export function add(data) {
  return request({
    url: 'admin/api/userExtract',
    method: 'post',
    data
  })
}

export function rejectExtract(id) {
  return request({
    url: 'admin/api/userExtract/reject/' + id,
    method: 'post'
  })
}

export function success(id) {
  return request({
    url: 'admin/api/userExtract/success/' + id,
    method: 'post'
  })
}

export function del(id) {
  return request({
    url: 'admin/api/userExtract/delete' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: 'admin/api/userExtract',
    method: 'put',
    data
  })
}

// 删除
export function delUserExtract(data) {
  return request({
    url: 'admin/api/userExtract/delete',
    method: 'delete',
    data
  })
}

// 导出
export function exportUserExtract(query) {
  return request({
    url: 'admin/api/userExtract/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 导出驳回记录
export function exportRecord(query) {
  return request({
    url: 'admin/api/userExtract/rejectExtract/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
